package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 3:08:52 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbTecUnidad generated by hbm2java
 */
@Entity
@Table(name = "TB_TEC_UNIDAD", schema = "CATALOGOS")
@SequenceGenerator(name="SEQ_TB_TEC_UNIDAD" , sequenceName="SEQ_TB_TEC_UNIDAD")
public class TbTecUnidad implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Long id;
	private RcRuc rcRuc;
	private TbUnidad tbUnidad;
	private Date fhingreso;
	private Date fhfin;

	public TbTecUnidad() {
	}

	public TbTecUnidad(Long id) {
		this.id = id;
	}

	public TbTecUnidad(Long id, RcRuc rcRuc, TbUnidad tbUnidad, Date fhingreso,
			Date fhfin) {
		this.id = id;
		this.rcRuc = rcRuc;
		this.tbUnidad = tbUnidad;
		this.fhingreso = fhingreso;
		this.fhfin = fhfin;
	}

	@Id
	@Column(name = "ID", unique = true, nullable = false, precision = 15, scale = 0)
	@GeneratedValue(strategy=GenerationType.AUTO, generator="SEQ_TB_TEC_UNIDAD")
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NIT")
	public RcRuc getRcRuc() {
		return this.rcRuc;
	}

	public void setRcRuc(RcRuc rcRuc) {
		this.rcRuc = rcRuc;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_UNIDAD")
	public TbUnidad getTbUnidad() {
		return this.tbUnidad;
	}

	public void setTbUnidad(TbUnidad tbUnidad) {
		this.tbUnidad = tbUnidad;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FH_FIN", length = 7)
	public Date getFhfin() {
		return this.fhfin;
	}

	public void setFhfin(Date fhfin) {
		this.fhfin = fhfin;
	}

}
